package metamodel.transformer;

import metamodel.ClassNode;
import metamodel.CollectionRef;
import metamodel.FlatProperty;
import metamodel.transformer.BottomUpTreeTransformer;
import metamodel.transformer.PropertyValue;

import java.util.List;
import java.util.Collection;

/**
 * User: fleipold
 * Date: 08-Jan-2008
 * Time: 19:32:26
 */
public class SimpleTreeTransformerAdapter implements BottomUpTreeTransformer {
    private SimpleBottumUpTreeMapper simpleMapperBottumUp;

    public SimpleTreeTransformerAdapter(SimpleBottumUpTreeMapper simpleMapperBottumUp) {
        this.simpleMapperBottumUp = simpleMapperBottumUp;
    }

    public Object mapObject(ClassNode meta, List<PropertyValue> mappedProperties, Object originalObject) {
        return simpleMapperBottumUp.mapObject(meta, mappedProperties);
    }

    public Object mapCollection(CollectionRef meta, Collection mappedElements, Collection originalCollection) {
        return simpleMapperBottumUp.mapCollection(meta, mappedElements);
    }

    public Object mapFlatProperty(FlatProperty meta, Object value) {
        return null;
    }
}
